package com.lyf.network.learn.nio;

import org.junit.Test;

import java.io.IOException;
import java.io.InputStream;
import java.nio.Buffer;
import java.nio.ByteBuffer;
import java.nio.channels.Channel;
import java.nio.channels.FileChannel;
import java.nio.file.Path;

/**
 * @AUTHOR LYF
 * @DATE 2022/6/9
 * @VERSION 1.0
 * @DESC
 *
 *
 *
 */
public class BufferTest {
    String path = "E:\\JavaProjects\\LearnProjects\\learn-practice\\java-base\\src\\main\\java\\com\\lyf\\network\\learn\\nio\\files\\tmp";
    @Test
    void test1(){
        try {
            Channel channel = FileChannel.open(Path.of(path));
            Buffer buffer = ByteBuffer.allocate(1000);//new ByteBuffer();


        } catch (IOException e) {
            e.printStackTrace();
        }


    }
}
